package com.jy.api.dao;

        import com.jy.api.domain.TableSalesCode;
        import org.springframework.data.domain.Page;
        import org.springframework.data.domain.Pageable;
        import org.springframework.data.repository.CrudRepository;

/**
 * Created by xiaohua on 2019/3/29.
 */
public interface TableSalesCodeDao extends CrudRepository<TableSalesCode, Integer> {


    TableSalesCode findByCodeAndEnabled(String code,boolean enabled);


    Page<TableSalesCode> findAllByParentUserNameIsNullOrderByCountDesc(Pageable pageable);


    TableSalesCode findByUserName(String mobile);


    TableSalesCode findByCode(String code);

}
